package com.estate.estatemanagement.controller;

import com.estate.estatemanagement.common.Result;
import com.estate.estatemanagement.domain.Community;
import com.estate.estatemanagement.service.CommunityService;
import org.apache.commons.io.filefilter.FalseFileFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 小区管理控制层
 *                  controller调用server
 *                  前端调用controller
 *
 *
 */
@RestController
@RequestMapping("/community")
public class CommunityController {
    @Autowired
    private CommunityService CommunityService;//注入service接口
    
     
    @RequestMapping("/find")
    public Result find(){
        List<Community> all = CommunityService.findALL();//调用方法

        return new Result(false,200,"请求成功",all);

    }
}
